﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _19.备忘录模式.Models
{
    public class Manager
    {
        private Memo Memo { get; set; }

        public void Backup(GameState state)
        {
            Console.WriteLine("管理员正在备份游戏状态...");
            Memo = state.Create();
        }

        public void Restore(GameState state)
        {
            Console.WriteLine("管理员已还原游戏状态...");
            state.Restore(Memo);
        }
    }
}
